/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package appClientHandler.admin2;

import appClientHandler.AbstractAUPBean;
import entities.Account;
import entities.Product;
import javax.ejb.Stateful;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Remove;


/**
 *
 * eCOM - Adopte un Presta - Mars-Avril 2013
 * @author Kheira, Jef, William, Tuan-Long
 */
@Stateful
@TransactionManagement(TransactionManagementType.BEAN)
public class AUPAdmin2Bean extends AbstractAUPBean implements AUPAdmin2Remote 
{
/*
    @EJB
    private AdminFacadeLocal adminFacade;
    * */
 
    private String adminName;

   
    @Override
    public void authenticate(String login, String password){
        /*
                Admin admin = this.adminFacade.authenticate(login, password);

		if (admin != null) {
			adminName = admin.getName();
		}
                * */
    }
    
    @Override
    public String getAdminName() 
    {
        return adminName;
    }

    @Remove
    @Override
    public void removeBean() {

    }

    @Override
    public List<Account> getAccountList() {
        return this.accountFacade.findAll();
    }

    @Override
    public void saveProduct(Product p) {
        /*
	p.setCategory(categorieFacade.find(100));
	this.productFacade.insert(p);
        */
    }
    
}
